PROJECT(COINQMipExample)
################################################################################
#
#  qmip: In this, we build qmip from the Cbc/examples folder but using the
#        FIND_PACKAGE module of CMake. This will illustrate the ease with which
#        CMake can be used to build out-of-source executables. Before installing
#        please ensure that the <path_to_your_cbc_install>/cmake folder is 
#        set in the Global path locations (Environment variables in Windows or
#        path in Linux). 
#
################################################################################

CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
#Here we find the CBC package that we have installed previously. This example
#will not build if COINCbc is not found
FIND_PACKAGE(COINCbc REQUIRED)
INCLUDE(${COINCbc_USE_FILE})
INCLUDE_DIRECTORIES(${COINCbc_INCLUDE_DIRS})
FILE(GLOB QMIP_SRCS ${PROJECT_SOURCE_DIR}/*.cpp)
ADD_EXECUTABLE(COINQMipExample ${QMIP_SRCS})
TARGET_LINK_LIBRARIES(COINQMipExample ${COINCbc_LIBRARIES})
